package com.gao.shiro.jwt.token;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @Description TODO 自定义token类实现AuthenticationToken接口  并重写里面的方法
 * @Author anshenghui
 * @Date 2020/2/11 14:43
 * @Version 1.0
 */
public class MyToken implements AuthenticationToken {

    private static final long serialVersionUID = 1L;

    private String token;

    public MyToken() {

    }

    public MyToken(String token) {
        this.token = token;
    }


    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
